<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="ScrewTurn.Wiki.DefaultPage" MasterPageFile="~/MasterPage.master" EnableViewState="false" EnableSessionState="True" %>

<asp:Content runat="server" ID="CtnDefault" ContentPlaceHolderID="CphMaster">

    <asp:Literal ID="lblCookiePath" runat="server" EnableViewState="false"></asp:Literal>

    <script type="text/javascript">
    <!--
        function __ShowAllTrail() {
            try {
                document.getElementById("BreadcrumbsDivMin").style["display"] = "none";
                document.getElementById("BreadcrumbsDivAll").style["display"] = "";
                __SetStatus("1");
            }
            catch(ex) { }
            return false;
        }
        function __HideTrail() {
            try {
                document.getElementById("BreadcrumbsDivMin").style["display"] = "";
                document.getElementById("BreadcrumbsDivAll").style["display"] = "none";
                __SetStatus("0");
            }
            catch(ex) { }
            return false;
        }
        
        function __CreateCookie(name, value, days) {
	        if(days) {
		        var date = new Date();
		        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
		        var expires = "; expires=" + date.toGMTString();
	        }
	        else var expires = "";
	        document.cookie = name + "=" + value + expires + "; path=" + __cookiePath;
        }

        function __ReadCookie(name) {
	        var nameEQ = name + "=";
	        var ca = document.cookie.split(';');
	        for(var i =0; i < ca.length; i++) {
		        var c = ca[i];
		        while(c.charAt(0) == ' ') c = c.substring(1, c.length);
		        if(c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
	        }
	        return null;
        }

        function __EraseCookie(name) {
	        __CreateCookie(name, "", -1);
        }
        
        function __SetStatus(open) {
            __CreateCookie("ScrewTurnWikiBCT", open, 365);
        }
        function __GetStatus() {
            var value = __ReadCookie("ScrewTurnWikiBCT");
            if(value) return value;
            else return "0";
        }
        
    // -->
    </script>

    <% LoadPage(); %>
    
    <script type="text/javascript">
    <!--
        if(__GetStatus() == "1") __ShowAllTrail();
    // -->
    </script>
</asp:Content>
